package org.jupiter.blog.service.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jupiter.blog.api.domain.JupiterRole;

import java.util.List;

@Mapper
public interface JupiterRoleMapper {

	int insert(JupiterRole role);

	JupiterRole selectByUuid(@Param("uuid") String uuid);

	List<JupiterRole> selectAll();

	int updateByUuidSelective(JupiterRole role);

	int deleteByUuid(@Param("uuid") String uuid);

	List<JupiterRole> selectByPage(
			@Param("roleName") String roleName,
			@Param("offset") int offset,
			@Param("limit") int limit
	);

	long countByQuery(
			@Param("roleName") String roleName
	);

	List<JupiterRole> selectByUserId(@Param("userId") String userId);

	int restoreRole(@Param("uuid") String uuid);

}
